#pragma once
#include <memory>
#include <functional>
#include <nice2d/action.h>

class RepeatAction : public Action
{
public:
    RepeatAction() = delete;
    RepeatAction(std::function<void(NodePointer)> act, float interval = 3.0f);
    virtual ~RepeatAction();
public:
    float getInterval()const;
    void update(float deletaTime)override;
private:
    std::unique_ptr<class RepeatActionData> data;
};
